test: UserStampService 단위 테스트 추가 - #223
Conversation
createStampByUser/findUserStamps 전체에 대해 정상 케이스 + 경계값 검증 (15개). 코스/스크랩/기록/업로드 4개 활동 타입 각각의 스탬프 기준(1/10/30개)과 레벨업 조건(스탬프 4의 배수, 12개 상한)을 검증. 버그는 발견되지 않음. 다만 설계상 암묵적 계약 하나를 테스트로 명시해둠: createStampByUser(user, stampType)는 반드시 c/s/r/u 같은 "타입 마커" 값으로 호출해야 하고, c1/s2처럼 이미 레벨이 붙은 StampType으로 호출하면 getActivityCount의 switch가 매치되지 않아 조용히 무시됨 (예외 없음).
|
Warning Review limit reached
Next review available in: 49 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
작업 배경
UserStampService(스탬프 발급/레벨업 로직) 자체는 지금까지 직접 테스트된 적이 없었음.변경 사항
UserStampServiceTestcreateStampByUser/findUserStamps전체에 대해 정상/경계값 테스트 15개 신규버그는 발견되지 않음. 설계상 암묵적 계약 하나를 테스트로 문서화:
createStampByUser(user, stampType)는c/s/r/u같은 "타입 마커" 값으로만 호출해야 하고,c1/s2처럼 이미 레벨이 붙은StampType으로 호출하면 내부 switch가 매치되지 않아 예외 없이 조용히 무시됨.영향 범위
검증 매트릭스
코스_1개_c1•
코스_10개_c2•
코스_30개_c3•
활동카운트_0•
기준개수가_아니면_생성안함스크랩_타입•
기록_타입•
업로드_타입레벨_붙은_타입으로_호출하면_무시됨스탬프_4개면_레벨업•
스탬프_8개면_레벨3•
스탬프_12_초과면_레벨업_안함•
배수가_아니면_레벨업_안함정상_조회•
존재하지_않는_유저Test Plan
./gradlew build전체(ServerApplicationTests 포함) 통과 확인🤖 Generated with Claude Code